<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
<title>Mapa de Google</title>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAUnJY3ChJhF0YgyTSDJuVfBTqu-zEVMNfNVaqfAe9FKyfKhfBExSs9LrIQ7GOuBeSnaddg05sRmEBxQ"
        type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[

function load() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));	
		map.setCenter(new GLatLng(40,-4),3);	
		map.addControl(new GLargeMapControl());
		map.setMapType(G_NORMAL_MAP); 
		
		var point = new GPoint (-4,40);
		var marker = new GMarker(point); 
		map.addOverlay(marker); 
		
		GEvent.addListener(map, "click", function (overlay,point){
			if (point){
				marker.setPoint(point);
				document.posicion.x.value=point.x
				document.posicion.y.value=point.y
			}
		});
	}
}

window.onload=load
//]]>
</script>

</head>

<body>
	<div id="map" style="width: 765px; height: 278px"></div>
	<div id="formulario" style="margin: 10px">

	<form action="#" id="posicion" name="posicion">
	X: <input type="text" name="x" value="" />
	<br />
	Y: <input type="text" name="y" value="" />
	</form>
	</div>
	<br />
<br />
</body>
</html>




